import locale from "element-ui/src/locale";
import el from "element-ui/src/locale/lang/el";

/**
 @ClassName:components
 @Author:TwT
 @Date:2022/5/31 21:52
 @Version:1.0
 **/
const files = require.context('./t', true, /index.js/)

let components = []
files.keys().forEach(key => {
    let items = files(key).default;
    if (!items) return
    if (Array.isArray(items)) {
        items.forEach(item => {
            components.push(item)
        })
    } else {
        components.push(items)
    }
})

export default {
    install(Vue, opts = {}) {
        components.forEach(component => {
            Vue.component(component.name, component);
        });
    }
}




